




<input type="hidden" name="id"  id="id" class="form-control" value="<?php  if (!empty($sector)) echo $sector[0]['id']; ?>">
<div class="row form-row">
    <div class="col-md-12">
        <div class="input-with-icon  right">                                       
            <i class=""></i>
            <label class="form-label">Nombre</label>
            <input type="text" name="nombre"  id="nombre" class="form-control" placeholder="Ingrese el nombre del Sector" value="<?php if (!empty($sector))  echo $sector[0]['nombre']; ?>"
                   style='text-transform:uppercase' onkeyup='javascript:this.value = this.value.toUpperCase();'
                   >
        </div>
    </div>



</div>
<div class="row form-row">
    <div class="col-md-8">
        <div class="input-with-icon  right">

            <i class=""></i>
            <label class="form-label">Icono</label>
            <input type="text" name="icon"  id="icon" class="form-control" placeholder="Ingrese nombre del Icono Ej:  fa-adjust"  value="<?php if (!empty($sector))  echo $sector[0]['icon']; ?>">
        </div>
    </div>
    <div class="col-md-4">
        <div class="input-with-icon  right">
            <i class=""></i>
            <label class="form-label">Paleta de iconos</label>
            <a href="./fuentes/view/sector/icon.php" target="true"><i class="fa fa-wrench"></i>   Iconos</a>
        </div>
    </div>
</div>

<div class="row form-row">
    <div class="col-md-12">
        <div class="input-with-icon  right">                                       
            <i class=""></i>
            <label class="form-label">Sucursal</label>
            <select class="form-control" id="sucursal_id" name="sucursal_id">
                <?php
                $sucursal_id=0;
                if (!empty($sector)) $sucursal_id=$sector[0]["sucursal_id"];
                foreach ($sucursales as $datoS) {
                    if ($sucursal_id == $datoS["id"]) {
                        echo " <option selected='true' class='select2-results' value='" . $datoS["id"] . "'>" . $datoS["nombre"] . "</option>";
                    } else {
                        echo " <option class='select2-results' value='" . $datoS["id"] . "'>" . $datoS["nombre"] . "</option>";
                    }
                }
                ?>
            </select>

        </div>
    </div>

</div>


<div class="row form-row">
    <div class="col-md-12">
        <div class="input-with-icon  right">                                       
            <i class=""></i>
            <label class="form-label">IP</label>
            <input type="text" name="ip"  id="ip" class="form-control" placeholder="Ingrese nro ip ej.: 192.160.18.1" value="<?php  echo $sector[0]['ip']; ?>">
        </div>
    </div>

</div>

<div class="row form-row">
    <div class="col-md-12">
        <div class="input-with-icon  right">                                       
            <i class=""></i>
            <label class="form-label">Observaciones</label>
            <input type="text" name="observaciones"  id="observaciones" class="form-control" placeholder="Ingrese alguna observación" value="<?php  echo $sector[0]['observaciones']; ?>"
                   style='text-transform:uppercase' onkeyup='javascript:this.value = this.value.toUpperCase();'
                   >
        </div>
    </div>

</div>

<div class="row form-row">
    <div class="col-md-12 center-text" >
        <div id="mensaje_form"></div>   
    </div>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default" onclick="clearForm();" data-dismiss="modal">Cancelar</button>
    <button type="submit" id="submit_sector" class="btn btn-success btn-cons">Guardar</button>
    <img id="loading" src="web/assets/img/ajax_load.gif" alt="loading" style="visibility: hidden; "/>
</div>